package collections;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: leep
 * Date: 14-10-23
 * Time: 下午4:22
 * To change this template use File | Settings | File Templates.
 */
public class JavaList {
	public static void main(String[] args) {
		List list = new ArrayList();
		list.add(2);
		list.add(4);
		list.add(3);
		list.add(1);
		String s = list.toString();
		String aa = s.substring(1, s.length() - 1);
		System.out.println(aa);


		List a = new ArrayList();
		a.add(5);
		System.out.println(list.addAll(2, a));
		System.out.println(list);
	}
}
